import React, { Component } from 'react';

class Child extends Component {

  constructor(props) {
    super(props);
  }
  render() {
    const { children } = this.props
    console.log(children);
    console.log(React.Children.map(children, c => [c, [c, c]]));
    return (
      <div>
        {children}
      </div>
    )
  }
}

export default function() {
  return (
    <Child>
      <span>1</span>
      <span>2</span>
    </Child>
  )
};

